package designpattern.observer.mq;

/**
 * 订单观察者
 * @param <E>
 */
public class OrderObserver<E> extends Observer<E> {
    @Override
    void handEvent(E event){
        new Thread(new Runnable() {
            @Override
            public void run() {
                saveOrder(event);
            }
        }).start();
    }

    void saveOrder(E message){
        System.out.println("保存订单");
    }
}
